package com.example.jpa.entity;

import javax.persistence.Id;
import javax.persistence.MappedSuperclass;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import java.io.Serializable;
import java.util.Date;

/**
 * @author 朝花不迟暮
 * @version 1.0
 * @date 2020/12/8 21:25
 */
@MappedSuperclass
public class BaseEntry implements Serializable
{
    private static final long serialVersionUID = 5966306766659220492L;

    @Id
    protected String id;

    @Temporal(TemporalType.TIMESTAMP)
    protected Date createdDate;

    protected String createdBy;

    @Temporal(TemporalType.TIMESTAMP)
    protected Date updatedDate;

    protected String updatedBy;

    protected Boolean deleted = false;

    public BaseEntry()
    {
    }

    public String getId()
    {
        return id;
    }

    public void setId(String id)
    {
        this.id = id;
    }

    public Date getCreatedDate()
    {
        return createdDate;
    }

    public void setCreatedDate(Date createdDate)
    {
        this.createdDate = createdDate;
    }

    public String getCreatedBy()
    {
        return createdBy;
    }

    public void setCreatedBy(String createdBy)
    {
        this.createdBy = createdBy;
    }

    public Date getUpdatedDate()
    {
        return updatedDate;
    }

    public void setUpdatedDate(Date updatedDate)
    {
        this.updatedDate = updatedDate;
    }

    public String getUpdatedBy()
    {
        return updatedBy;
    }

    public void setUpdatedBy(String updatedBy)
    {
        this.updatedBy = updatedBy;
    }

    public Boolean getDeleted()
    {
        return deleted;
    }

    public void setDeleted(Boolean deleted)
    {
        this.deleted = deleted;
    }
}
